<?php
return array(
	'searchColumns' => array(
		'provider_id' => array(
			'dropDownList', Yii::app()->enum->options('worker.agentProvider'),
			'visible' => 'Yii::app()->adminUser->role != AdminUser::ROLE_PROVIDER',
		),
		'dealer_id' => array('dropDownList', Yii::app()->enum->options('worker.agentDealer'),
			'visible' => 'Yii::app()->adminUser->role != AdminUser::ROLE_DEALER',
		),
		'status' => array('dropDownList', $model->stateHandle->options()),
	),

	'dataColumns' => array(
		'id', 
		array(
			'name' => 'dealer.worker_name',
			'visible' => Yii::app()->adminUser->role != AdminUser::ROLE_DEALER,
		),
		array(
			'name' => 'provider.worker_name',
			'visible' => Yii::app()->adminUser->role != AdminUser::ROLE_PROVIDER,
		),
		array(
			'name' => 'status',
			'value' => '$data->stateHandle->lookup()'
		),
		array(
			'header' => '操作',
			'class' => 'ButtonColumn',
			'stateHandles' => array(
				'stateHandle',
			),
		),
	),
	'_import' => array(
		array('*', 'actions.admin//*'),
	),
);
?>